
/**   
* @Title: CreateAxlsx.java 
* @Package com.youhp.spire.xls.myDemo 
* @Description: TODO
* @author zs   
* @date 2020年7月14日 下午5:04:11 
* @version V1.0   
*/

package com.youhp.spire.xls.myDemo;

import com.spire.xls.CellRange;
import com.spire.xls.ExcelVersion;
import com.spire.xls.Workbook;
import com.spire.xls.Worksheet;

/** 
* @ClassName: CreateAxlsx 
* @Description: TODO
* @author youhp
* @date 2020年7月14日 下午5:04:11  
*/

public class CreateAxlsx {

	public static void main(String[] args) {
		Workbook workbook = new Workbook();
		//根据名称创建sheet
		String[] arg0 = {"练习1","练习2","练习3"};
		workbook.createEmptySheets(arg0);
		Worksheet sheet = workbook.getWorksheets().get(0);
		CellRange cellRange = sheet.getCellRange("A1");
		cellRange.setValue("");
		workbook.saveToFile("youhpXls/base/exercise.xlsx", ExcelVersion.Version2010);
	}
}
